package com.dataStructure.tree;

import java.nio.charset.StandardCharsets;
import java.sql.SQLOutput;
import java.util.*;

abstract class Shape{
    static final double PI = 3.14;
    public abstract double getPerimeter();
    public abstract double getArea();
}

class Rectangle extends Shape{
    private int width;
    private int length;
    public Rectangle(int width,int length) {
        this.width = width;
        this.length = length;
    }
    public double getPerimeter() {
        return 2*(this.width+this.length);
    }
    public double getArea() {
        return this.width*this.length;
    }
    @Override
    public String toString() {
        return "Rectangle [width=" + width + ", length=" + length + "]";
    }
}

class Circle extends Shape{
    private int radius;
    public Circle(int radius) {
        this.radius = radius;
    }
    public double getPerimeter() {
        return PI*this.radius*2;
    }
    public double getArea() {
        return PI*this.radius*this.radius;
    }
    @Override
    public String toString() {
        return "Circle [radius=" + radius + "]";
    }
}

public class Main{
    public static void main(String [] args){
        boolean res = isInteger("无");
        System.out.println(res);
    }

    public static boolean isInteger(String str) {
        for (int i = str.length();--i>=0;){
            if (!Character.isDigit(str.charAt(i))){
                return false;
            }
        }
        return true;



    }
}
